<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>拉拉货物流有限公司</title>
		<meta name="keywords" content="拉拉货物流有限公司,汕头物流配送,汕头物流,汕头物流货运,汕头货运,全国货运,厦门物流配送,深圳物流配送,广州物流配送,物流配送,物流货运,货运配送" />
	    <meta name="description" content="拉拉货物流有限公司是一家承接全国各地门到门配送业务的专业第三方物流，为企业量身定做仓储、配送物流方案，针对大小客户配备专业项目小组进行专人专车对接。" />
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	    <link rel="stylesheet" href="css/amazeui.min.css" type="text/css" />
	    <link rel="stylesheet" href="css/style.css" type="text/css" />
	    <script type="text/javascript" src="js/jquery.min.js" ></script>
	    <script type="text/javascript" src="js/amazeui.min.js" ></script>
	</head>
	<body>
		<header data-am-widget="header" class="am-header am-header-default header-green1">
	      <div class="am-header-left am-header-nav ">
		        <a href="javascript:history.back()" style="color: #fff;"><i class="am-icon-chevron-left"></i></a>
	        </div>
		  <h1 class="am-header-title" style="color: #fff;">订单详情</h1>
		 <!-- <div class="am-header-right am-header-nav">
	      	<a href="complaint.html" style="color: #fff;">投诉</a>
	      </div> -->
       </header>
	   <div class="jl"></div>
       <ul class="find">
       	  <li style="border: 0;">
	       	  	<img class="tx" src="images/tx.png"/>
	       	  	<div class="find-left">
	       	  		<p class="name" id="site">青岛 — 滨州</p>
	       	  		<p class="style" style="color: #2b9f55;" id="goods">普货/8.0吨/9.6米</em></p>
	       	  		<p class="car">
	       	  			<i class="mingzi">下单时间</i>
						<i class="iconfont">&#xe605;</i>
						<i class="shijian" id="creatTime"></i>
	       	  		</p>
					<p class="car">
						<i class="mingzi">完成时间</i>
						<i class="iconfont">&#xe605;</i>
						<i class="shijian" id="arrivalTime">00:00:00</i>
					</p>
	       	  	</div>
	       	  	<!-- <a href="" class="rote">
	       	  		<i class="iconfont">&#xe600;</i>路线>
	       	  	</a> -->
       	  </li>
		  <div>
		  	订单编号：<span id="orderNumber"></span>
		  </div>
        </ul>
        <div style="height: 5px; background: #e8e8e8;"></div>
        <div class="infor">
        	备注：<span style="text" id="remake" value=""/>
        </div>
			<input type="checkbox" name="fragile" id="fragile" checked="checked"/>易碎
			<input type="checkbox" name="extra" id="extra" checked="checked"/>帮助搬运
		<div style="height: 5px; background: #e8e8e8;"></div>
		<div class="infor">
			 <h2>司机姓名：<font  id="driverName" size="" color=""></font></h2>
			<h2>车辆类型：<font  id="driverType" size="" color=""></font>  </h2>
		<h2>车牌号：<font  id="driverNumber" size="" color=""></font>  </h2>
		</div>
		<div style="height: 5px; background: #e8e8e8;"></div>
        <div class="transaction">
        	<span>订单支付</span>
        	<ul>
        		<li style="height: 100px;">
        			<h2>收件人信息</h2>
        			<p id="consigneeName">收件人姓名：</p>
					<p id="consigneeTel">收件人电话：</p>
        		</li>
        		<li>
        			<em>￥</em>
        			<input type="text" id="orderPrice" placeholder="支付金额" readonly="readonly"/>
        			<button class="money" id="pay" style="display: none;">支付</button>
				</li>
        	</ul>
        </div>
        <div class="jl"></div>
		 <div data-am-widget="navbar" class="am-navbar  dream-foot am-no-layout" id="">
		      <ul class="am-navbar-nav1 am-cf am-avg-sm-5">   
		          <li>
		            <a href="index2.html" class="">
		                <span class="iconfont">&#xe60b;</span>
		                <p class="am-navbar-label">首页</p>
		            </a>
		          </li>
		          <li>
		            <a href="nearby.html" class="">
		                <span class="iconfont">&#xe60c;</span>
		                <p class="am-navbar-label">附近</p>
		            </a>
		          </li>
		       <li>
		            <a  class="">
		                <span class="add"><i class="iconfont" style="font-size: 30px; line-height: 40px;">&#xe60e;</i></span>
		                <p class="am-navbar-label" style="margin-top: -36px;"></p>
		            </a>
		          </li>
		          <li>
		            <a href="message.html" class="">
		                <span class="iconfont">&#xe60d;</span>
		                <p class="am-navbar-label">新消息</p>
		            </a>
		          </li>
		          <li>
		            <a href="member.html" class="curr">
		                <span class="iconfont">&#xe609;</span>
		                <p class="am-navbar-label">个人中心</p>
		            </a>
		          </li>
		      </ul>
		</div>
		<script>
			var url= JSON.parse(sessionStorage.getItem("url"));
			var user=JSON.parse(sessionStorage.getItem("user"));
			var order=JSON.parse(sessionStorage.getItem("order"));
			console.log(order)
			$(function(){
				$.ajax({
					url:url+'/orderDetails/selectById?id='+order.orderDetailsid,
					type:'get',
					dataType:'json',
					success:function(r){
						if(r.code==200){
							var data=r.data;
							$.ajax({
								url:'http://xfuncs.qicp.vip:9527/info/all?driverId='+data.driverId,
								dataType:'json',//服务器返回json格式数据
								type:'get',//HTTP请求类型
								timeout:10000,//超时时间设置为10秒；
								success:function(r){
									data=$.parseJSON(r.data)
									console.log(data)	
									console.log(data.driverInfo.name)
									$("#driverName").html(data.driverInfo.name)
									$("#driverNumber").html(data.driverCar.licenseNumber)
									if(data.driverCar.idCarType==1){
										$("#driverType").html("小面包车")
										}
										if(data.driverCar.idCarType==2){
											$("#driverType").html("中面包车")
											}
											if(data.driverCar.idCarType==3){
												$("#driverType").html("小卡车")
												}
												if(data.driverCar.idCarType==4){
													$("#driverType").html("中卡车")
													}
									
									
								},
								error:function(xhr,type,errorThrown){
									
								}
							});
							
							
							var m="m³";
							if(data.fragile==1){
								$("#fragile").attr("checked",false)
							}if(data.extra==1){
								$("#extra").attr("checked",false)
							}
							if(order.status==0){
								$("#pay").attr("style","display:block;");
								$("#pay").click(function(){
									location.href=url+"/price/alipay?price="+data.orderPrice;
								})
							}
							console.log(data.orderPrice)
							$("#remake").html(data.remake)
							$("#creatTime").html(order.creatTime)
							$("#orderNumber").html(order.orderNumber)
							$("#arrivalTime").html(order.creatTime)
							$("#site").html(order.startSite+"——"+order.endSite)
							$("#goods").html(order.goodsName+"/"+order.goodsNumber+"KG"+"/"+order.goodsVolume+m)
							$("#consigneeName").html("收件人姓名："+data.consigneeName)
							$("#consigneeTel").html("收件人电话："+data.consigneeTel)
							$("#orderPrice").val(data.orderPrice+"元")
						}
					}
				});
				
				
				
				
				
				
				
			
			})
			
			
		</script>
	</body>
</html>